function deplicatedWord (arr) {
  let map = {}
  for (let i = 0; i < arr.length; i++) {
    if (map[arr[i]] === undefined) {
      map[arr[i]] = false
    } else if (map[arr[i]] === false) {
      map[arr[i]] = true
    }
  }
  return map
}
console.log(deplicatedWord(['a', 'b', 'a', 'b', 'c']));
console.log(deplicatedWord(['a', 'b', 'c']));
console.log(deplicatedWord(['a', 'a', 'a', 'a',]));